<template>
  <!-- 线索单导入 -->
  <div class="app-container app-container-table">
      <one-table-template
        ref="multipleTable"
        :dynamicButtons="tableButtons"
        :dynamicComponents="tableComponents"
        :dynamicApiConfig="apiConfig"
        :dynamicTableCols="tableCols"
        :dynamicFormFields="formField"
        :dynamicIsShowSelect="false"
        :dynamicIsInitTable="false"
        :dynamicIsColumnDrop="false"
      />

  </div>
</template>
<script>
import Table from "@/components/crm/table/Table";
import { crmApis } from "@/api/apiList/crm";
import crmClueImportPage from "@/views/crm/coc/crmClueImportPage.vue";
import OneTableTemplate from "@/components/crm/Template/crmonePage";
import { oneTableWithViewTemplateMixins } from "@/components/mixins/oneTableWithViewTemplateMixins";

export default {
  name: "ClueOrderImport",
  mixins: [oneTableWithViewTemplateMixins],
  components: {
    Table,
    crmClueImportPage,
    OneTableTemplate
  },
  data() {
    return {
      fileList: [],
      file: {
        name: ""
      },
      fileParam: "",
      apiConfig: crmApis.dbTempClueQueryFindAll,
      tableComponents:
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path] &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableComponents.length > 0
          ? this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableComponents
          : [
              // {
              //   compKey: "compKey1",
              //   labelName: "批次号",
              //   codeField: "batchNo",
              //   component: () =>
              //     import("@/components/crm/textbox/crmTextInput"),
              //   type: "inputText",
              //   isMust: false,
              //   hidden: true
              // },

              {
                compKey: "compKey4",
                component: () => import("@/views/crm/coc/clueManager/crmImport"),
                type: "inputText",
                isMust: false,
                importHref:"/template/crm/线索单导入模板.xlsx",
                importDownload:"线索单导入模板.xlsx",
                labelName:"线索单导入模板下载",
                importUrl:"/ly/mp/busicen/csc/excel/csBuClueServerInfoMutationDlrClue.do",
                span:12
              },
              {
                compKey: "compKey5",
                component: () => import("@/views/crm/coc/clueManager/crmImport"),
                type: "inputText",
                isMust: false,
                importHref:"/template/crm/垂直媒体-店端导入模板.xlsx",
                importDownload:"垂直媒体-店端导入模板.xlsx",
                labelName:"垂直媒体-店端导入模板下载",
                importUrl:"/ly/mp/busicen/csc/excel/csBuClueServerInfoMutationDlrClue.do?createType=1",
                span:12
              },
              {
                compKey: "compKey2",
                labelName: "处理状态",
                codeField: "processType",
                lookuptype: "LX832",
                component: () => import("@/components/org/LookupValue"),
                type: "dropdownList",
                isMust: false,
                isMul:false,
              },
              {
                compKey: "compKey3",
                labelName: "创建时间",
                codeField: "createdDateStart,createdDateEnd",
                component: () => import("@/components/crm/Time/crmdtDatePicker"),
                type: "inputText",
                isMust: false
              },
            ],
      // 动态生成网格列
      tableCols: [
        {
          prop: "processName",
          label: "处理状态",
          width: 100,
          align: "center",
          fixed: true
        },
        {
          prop: "modifyDate",
          label: "创建时间",
          width: 150,
          align: "center",
          fixed: true
        },
        {
          prop: "errrMsg",
          label: "错误信息",
          width: 200,
          align: "center",
          fixed: true
        },
        // {
        //   prop: "batchNo",
        //   label: "批次号",
        //   width: 250,
        //   align: "center",
        //   fixed: true
        // },
        {
          prop: "custName",
          label: "姓名",
          width: 120,
          align: "center"
        },
        {
          prop: "gender",
          label: "性别",
          width: 80,
          align: "center"
        },
        {
          prop: "mobile",
          label: "联系电话",
          width: 120,
          align: "center"
        },
        {
          prop: "carSeries",
          label: "意向车系",
          width: 150,
          align: "center"
        },
        {
          prop: "carType",
          label: "意向车型",
          width: 220,
          align: "center"
        },
        {
          prop: "intentLevel",
          label: "意向级别",
          width: 80,
          align: "center"
        },
        // {
        //   prop: "busiSource",
        //   label: "线索渠道",
        //   width: 120,
        //   align: "center"
        // },
        // {
        //   prop: "infoSource",
        //   label: "一级信息来源",
        //   width: 120,
        //   align: "center"
        // },
        {
          prop: "infoChanDName",
          label: "二级信息来源",
          width: 120,
          align: "center"
        },
        {
          prop: "remark",
          label: "线索描述",
          width: 100,
          align: "center"
        },
        {
          prop: "purcDarDuget",
          label: "购车预算",
          width: 80,
          align: "center"
        },
        {
          prop: "remainDataDate",
          label: "留资时间",
          width: 150,
          align: "center"
        },
        {
          prop: "nextCallbackDate",
          label: "下次回访时间",
          width: 150,
          align: "center"
        }
      ],
      formField: {
        batchNo: "",
        processType:"",
        createdDateStart:"",
        createdDateEnd:"",
      }
    };
  },
  created() {
    // this.file={}
    this.fileList = [];
  },
  methods: {

  }
};
</script>
<style>
.filter-params .el-form-item__label {
  margin-right: 0px;
}
.query-params .el-col {
  margin-bottom: 0px;
}
</style>
